use std::process::Command;
use crate::error::YamError;

pub fn convert_to_gguf(
    input_path: &str,
    output_path: &str,
    format: ConversionFormat
) -> Result<(), YamError> {
    let converter = match format {
        ConversionFormat::PyTorch => "convert-pth-to-ggml",
        ConversionFormat::Safetensors => "convert-safetensors-to-gguf",
    };

    Command::new(converter)
        .arg(input_path)
        .arg(output_path)
        .status()?;

    Ok(())
}

#[derive(Debug, Clone, Copy)]
pub enum ConversionFormat {
    PyTorch,
    Safetensors,
    ONNX,
}